<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>vue</title>
    <script src="./vue.js"></script>
    <style>
        #root {
            width: 500px;
            margin: 200px auto;
            text-align: center;
        }
    </style>
</head>

<body>
    <div id="root">
        <!-- v-show是使用‘display:none’来达到效果 -->
        <span v-show='1===1'>我能被看见</span><br>
        <!-- v-if是直接操纵dom节点是否存在来渲染 -->
        <span v-if='1===1'>if我能被看见</span>
        <span v-else-if='1===1'>else if我能被看见</span>
        <span v-else-if='1===1'>我能被看见</span>
        <!-- if和else if之间不能有其他元素 -->
    </div>
    <script>
        Vue.config.productionTip = false
        const vm = new Vue({
            el: '#root',
            data: {
                guas: [{
                    name: '金瓜粒子',
                    price: '两块钱一斤',
                    id: '001'
                }, {
                    name: '金瓜皮',
                    price: '10块钱一斤',
                    id: '002'
                }]
            }
        })
    </script>
</body>

</html>